package com.woniuxy.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 操作日志表
 * @TableName t_sys_log_opt
 */
@TableName(value ="t_sys_log_opt")
@Data
public class SysLogOpt implements Serializable {
    /**
     * 主键ID，自增
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    private Integer uId;

    /**
     * 用户名
     */
    private String uName;

    /**
     * 操作名称
     */
    private String optName;

    /**
     * 请求方式（GET、POST等）
     */
    private String reqType;

    /**
     * 请求路径
     */
    private String reqUrl;

    /**
     * 类全名
     */
    private String fullClass;

    /**
     * 方法名
     */
    private String method;

    /**
     * 请求参数
     */
    private String reqParams;

    /**
     * 返回结果
     */
    private String respData;

    /**
     * 操作时间
     */
    private Date optTime;

    /**
     * 扩展字段1
     */
    private String uRole;

    /**
     * 扩展字段2
     */
    private String ipaddress;

    /**
     * 扩展字段3
     */
    private String ext3;

    /**
     * 扩展字段4
     */
    private String ext4;

    /**
     * 扩展字段5
     */
    private String ext5;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysLogOpt other = (SysLogOpt) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUId() == null ? other.getUId() == null : this.getUId().equals(other.getUId()))
            && (this.getUName() == null ? other.getUName() == null : this.getUName().equals(other.getUName()))
            && (this.getOptName() == null ? other.getOptName() == null : this.getOptName().equals(other.getOptName()))
            && (this.getReqType() == null ? other.getReqType() == null : this.getReqType().equals(other.getReqType()))
            && (this.getReqUrl() == null ? other.getReqUrl() == null : this.getReqUrl().equals(other.getReqUrl()))
            && (this.getFullClass() == null ? other.getFullClass() == null : this.getFullClass().equals(other.getFullClass()))
            && (this.getMethod() == null ? other.getMethod() == null : this.getMethod().equals(other.getMethod()))
            && (this.getReqParams() == null ? other.getReqParams() == null : this.getReqParams().equals(other.getReqParams()))
            && (this.getRespData() == null ? other.getRespData() == null : this.getRespData().equals(other.getRespData()))
            && (this.getOptTime() == null ? other.getOptTime() == null : this.getOptTime().equals(other.getOptTime()))
            && (this.getURole() == null ? other.getURole() == null : this.getURole().equals(other.getURole()))
            && (this.getIpaddress() == null ? other.getIpaddress() == null : this.getIpaddress().equals(other.getIpaddress()))
            && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()))
            && (this.getExt4() == null ? other.getExt4() == null : this.getExt4().equals(other.getExt4()))
            && (this.getExt5() == null ? other.getExt5() == null : this.getExt5().equals(other.getExt5()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUId() == null) ? 0 : getUId().hashCode());
        result = prime * result + ((getUName() == null) ? 0 : getUName().hashCode());
        result = prime * result + ((getOptName() == null) ? 0 : getOptName().hashCode());
        result = prime * result + ((getReqType() == null) ? 0 : getReqType().hashCode());
        result = prime * result + ((getReqUrl() == null) ? 0 : getReqUrl().hashCode());
        result = prime * result + ((getFullClass() == null) ? 0 : getFullClass().hashCode());
        result = prime * result + ((getMethod() == null) ? 0 : getMethod().hashCode());
        result = prime * result + ((getReqParams() == null) ? 0 : getReqParams().hashCode());
        result = prime * result + ((getRespData() == null) ? 0 : getRespData().hashCode());
        result = prime * result + ((getOptTime() == null) ? 0 : getOptTime().hashCode());
        result = prime * result + ((getURole() == null) ? 0 : getURole().hashCode());
        result = prime * result + ((getIpaddress() == null) ? 0 : getIpaddress().hashCode());
        result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
        result = prime * result + ((getExt4() == null) ? 0 : getExt4().hashCode());
        result = prime * result + ((getExt5() == null) ? 0 : getExt5().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", uId=").append(uId);
        sb.append(", uName=").append(uName);
        sb.append(", optName=").append(optName);
        sb.append(", reqType=").append(reqType);
        sb.append(", reqUrl=").append(reqUrl);
        sb.append(", fullClass=").append(fullClass);
        sb.append(", method=").append(method);
        sb.append(", reqParams=").append(reqParams);
        sb.append(", respData=").append(respData);
        sb.append(", optTime=").append(optTime);
        sb.append(", ext1=").append(uRole);
        sb.append(", ext2=").append(ipaddress);
        sb.append(", ext3=").append(ext3);
        sb.append(", ext4=").append(ext4);
        sb.append(", ext5=").append(ext5);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
